I understand what you want to do, but I am wondering if you are going about it the right way.
Please excuse me for asking what is likely to be a newbie type question since I have no familiarity with Wireguard.
As I understand it, you want to force a VPN connection for one specific domain, and want to explicitly disconnect that VPN connection for all others. The newbie type question I have for you is: how is that remote service informed of that disconnection? To my limited knowledge, when you connect to a specific website, that connection remains active until it is explicitly terminated. The usual way that happens is it times out, or that server explicitly drops you.
Otherwise, it seems to me you are waiting for something to happen that doesn't normally happen on its own, and perhaps that's the reason it is not disconnecting when you simply navigate to a different domain (assuming that is your expectation).
FYI I am reluctant to participate in that Apple Support Community post because it is very likely to attract unhelpful replies such as "why would you want to do that" and / or "VPNs are useless"... which may be true. Owing to the recent enormous popularity of commercial / "coffee shop" VPNs they have attracted millions of uniformed / misinformed people that run into trouble with them, then come to ASC for help. For them, removing the commercial VPN is the instant solution.
"Answers" like that will not help you resolve your concern though, so I don't want to encourage them by even participating. What you want to do is reasonable, and I understand, though I might not be able to help.
Perhaps you would be better off posting a question in
https://www.reddit.com/r/WireGuard/
I realize that amounts to asking for swimming lessons in a cesspool, but you might find a few nuggets floating around in there. Personally I despise Reddit.
Topic:
Developer Tools & Services
SubTopic:
Developer Forums
Tags: